package com.blb.zy_community.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zy_community.entity.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * <p>
 * 房屋绑定表  Mapper 接口
 * </p>
 *
 * @author 二组
 * @since 2023-06-18
 */
@Mapper
public interface ZyOwnerRoomMapper extends BaseMapper<ZyOwnerRoom> {
    /**
     * 分页查询
     */
    Page<ZyOwnerRoom> selectZyOwnerRoomPage(Page<ZyOwnerRoom> page,String roomStatus,String communityId);

    List<ZyOwnerRoom> selectZyOwnerRoom(Long ownerRoomId);

    @Update("update zy_owner_room set room_status = #{roomStatus} where owner_room_id = #{ownerRoomId}")
    void updateZyOwnerRoom(ZyOwnerRoom zyOwnerRoom);

    List<ZyOwnerRoom> selectByOwnerId(Long id);
}
